<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>

    {% if request.session.username %}
        <p>欢迎 {{ request.session.username }}</p>
        <p><a href="/user/logout">退出登陆</a></p>
        <p><a href="">进入我的笔记</a></p>
    {% else %}
        {% if request.COOKIES.username %}
            <p>欢迎 {{ request.COOKIES.username }}</p>
            <p><a href="/user/logout">退出登陆</a></p>
            <p><a href="">进入我的笔记</a></p>

        {% else %}
                <p><a href="/user/login">登陆</a></p>
                <p><a href="/user/reg">注册</a></p>
        {% endif %}
    {% endif %}


</body>
</html>